﻿package com.cuboWEB.script {
	
	import flash.net.navigateToURL;
	import flash.net.URLRequest;
	import flash.events.ContextMenuEvent;
    import flash.ui.ContextMenu;
    import flash.ui.ContextMenuItem;
    import flash.display.Sprite;

	public class cuboMENU extends Sprite{

		public function cuboMENU():void {
		var meuContextMenu:ContextMenu = new ContextMenu();
		meuContextMenu.hideBuiltInItems();
 
		var meuItem:ContextMenuItem = new ContextMenuItem("Sistema CUBO Web");
		var meuItem2:ContextMenuItem = new ContextMenuItem("Administração");
		meuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, mostraLink);
		meuItem2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, mostraLink2);
		meuContextMenu.customItems.push(meuItem);
		meuContextMenu.customItems.push(meuItem2);
 
		contextMenu = meuContextMenu;
		}
		
		private function mostraLink (meuEventoTipo:ContextMenuEvent):void {
			var minhaURL:URLRequest = new URLRequest("http://www.interactiveworld.com.br");
			navigateToURL(minhaURL, "_blank");
		}
		private function mostraLink2 (meuEventoTipo:ContextMenuEvent):void {
			var minhaURL:URLRequest = new URLRequest("admin");
			navigateToURL(minhaURL, "_blank");
		}
		
	}
	
}